package com.youyun.xiaoyuan.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.youyun.xiaoyuan.R;
import com.youyun.xiaoyuan.activity.CircleActivity;
import com.youyun.xiaoyuan.activity.ScheduleActivity;
import com.youyun.xiaoyuan.base.BaseFragment;

/**
 * Created by Wood on 2015-12-6.
 */
public class FoundFragment extends BaseFragment implements View.OnClickListener
{
    LinearLayout bt_schedule;
    LinearLayout choujiang;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        return inflater.inflate(R.layout.found_fragment_layout,null);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState)
    {
        super.onViewCreated(view, savedInstanceState);
        bt_schedule=(LinearLayout)view.findViewById(R.id.bt_schedule);
        bt_schedule.setOnClickListener(this);
        choujiang=(LinearLayout)view.findViewById(R.id.choujiang);
        choujiang.setOnClickListener(this);
    }

    @Override
    public void onClick(View v)
    {
        switch (v.getId())
        {
            case R.id.bt_schedule:startActivity(new Intent(getActivity(), ScheduleActivity.class));break;
            case R.id.choujiang:startActivity(new Intent(getActivity(), CircleActivity.class));break;
        }
    }
}
